<template>
  <div class="param-info" v-if="Object.keys(paramInfo).length !== 0">
    <table class="info-size" v-for="(table,index) in paramInfo.sizes" :key="index">
      <tr v-for="(tr,indey) in table" :key="indey">
        <td v-for="(td,indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>
    <table class="info-param">
      <tr v-for="(info,index) in paramInfo.infos" :key="index">
        <td class="info-param-key">{{info.key}}</td>
        <td class="param-value">{{info.value}}</td>
      </tr>
    </table>
    <div class="info-img" v-if="paramInfo.image.length !== 0">
      <img v-for="(img,indem) in paramInfo.image" :key="indem" :src="img" alt="">
    </div>
  </div>
</template>

<script>
  export default {
    name:"DetailParamInfo",
    props:{
      paramInfo:{
        type:Object,
        default(){
          return {}
        }
      }
    }
  }
</script>

<style scoped>
  .param-info {
    padding: 30px 15px;
    border-bottom: 5px solid #f2f5f8;
    font-size: 16px;
  }

  .param-info  table {
    width: 100%;
    border-collapse: collapse;
  }

  .param-info table tr {
    width: 100%;
    height: 42px;
    border-bottom: 1px solid rgba(100,100,100,.1);
  }

  .info-size tr td:nth-child(1) ,.info-param-key{
    /* 防止后面的内容干扰前面的布局 , 前面的key一个固定的宽度*/
    width: 20%;
  }

  .param-value {
    color: #eb4868
  }

  .info-img {
    display: flex;
    flex-wrap: wrap;
  } 
  .info-img img {
    width: 100%;
  }
</style>